<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>	
<%@ include file="/pub/headmeta.jsp" %>
</head>
<body class="edit-bgr-color">
	<div class="right-head"><span class="right-head-font">新增年龄段</span></div>
	<div align="center" style="width: 98%">	
		<form id="addForm" method="post" enctype="multipart/form-data">			
			<table cellpadding="5" style="width: 600px; font-size: 12px;">
				<tr>
					<td width="35%" align="right">年龄段：</td>
					<td width="65%" align="left"><input type="text" name="ageArea" id="ageArea" style="width: 80%"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">年龄段描述：</td>
					<td align="left"><textarea name="ageNote" id="ageNote"  rows="6" style="width: 80%"></textarea>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">年龄段图片：</td>
					<td align="left"><input type="file" name="agePic" id="agePic" style="width: 80%"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
			</table>
			<div class="edit-line"></div>
			<input  type="button" class="button-1" value="新增" onclick="doAdd();"/>
			<input  type="button" class="button-1" value="重置" onclick="resetEx(this.form);"/>						
			<input  type="button" class="button-1" value="返回" onclick="back();"/>
		</form>
	</div>
</body>
</html>
<script type="text/javascript">
<!--

//新增
function doAdd() {
	if ($("#ageArea").val()== ""){
		alert('年龄段不能为空！');
		return;
	}
	if ($("#ageNote").val()== ""){
		alert('年龄段描述不能为空！');
		return;
	}
	if ($("#agePic").val()== ""){
		alert('年龄段图片不能为空！');
		return;
	}	
	var form=$("#addForm");
	form.attr("action","${ctx}/age!add.action"); 
	form.submit();	
}
//返回
function back(){
	location.href="${ctx}/age!viewList.action";
}
//-->
</script>
